import React from 'react';

import BaseExecuter from '../common/BaseExecuter';
import Constants from '../../common/Constants';

import DataManager from '../../datas/DataManager';

export default class JifenMallExecuter extends BaseExecuter {
  constructor() {
    super();
  }

  execute(action) {
    switch (action.name) {
      case "JifenMallPointAction":
        this._requestPoint(action);
        break;
      case "JifenMallSignAction":
        this._requestSign(action);
        break;
      case "JifenMallItemAction":
        this._requestItems(action);
        break;
      case "JifenMallRequestMyDuihuanAction":
        this._requestMyDuihuan(action);
        break;
      case "JifenMallAwardAction":
        this._requestAward(action);
        break;
      case "JifenMallToSignAction":
        this._requestToSign(action);
        break;
      case "JifenMallGetLuckerListAction":
        this._requestLuckerList(action);
        break;
      case "JifenMallChoujiangAction":
        this._requestChoujiang(action);
        break;
      case "JifenMallPointConfigAction":
        this._requestPointConfig(action);
        break;
      case "JifenMallRequestDuihuanItemDataAction":
        this._requestItemData(action);
        break;
      case "JifenMallSendBuyDuihuanItemAction":
        this._sendBuyDuihuanItem(action);
        break;
      default:
    }
  }

  _getModuleType() {
    return Constants.MODULE_TYPE.JIFENMALL;
  }

  _sendBuyDuihuanItem(action) {
    this._sendRequestCommonResponse(action, "sendBuyDuihuanItem");
  }

  _requestItemData(action) {
    this._sendRequestCommonResponse(action, "sendRequestItemData");
  }

  _requestMyDuihuan(action) {
    this._sendRequestCommonResponse(action, "sendRequestMyDuihuan");
  }

  _requestPoint(action){
    this._sendRequestCommonResponse(action, "sendRequestPoint");
  }

  _requestSign(action){
    this._sendRequestCommonResponse(action, "sendRequestSign");
  }
  _requestPointConfig(action){
    this._sendRequestCommonResponse(action, "sendPointConfig");
  }
  _requestItems(action){
    this._sendRequestCommonResponse(action, "sendRequestItems");
  }

  _requestAward(action){
    this._sendRequestCommonResponse(action, "sendRequestAward");
  }

  _requestToSign(action){
    this._sendRequestCommonResponse(action, "sendToSign");
  }

  _requestLuckerList(action){
    this._sendRequestCommonResponse(action, "sendLuckerList");
  }

  _requestChoujiang(action){
    this._sendRequestCommonResponse(action, "sendChoujiang");
  }

}
